From: Behnam Esfahbod Date: Sat, 2 Sep 2017 22:11:39 +0000 (-0700) Subject: [doc/book] Move section content to */index.md X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~6^2~61^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=71acd8f30492d4b6d69ac74b9869c9c50e611543;p=cargo.git [doc/book] Move section content to */index.md This gives a better over-all structure to the book, which we can also follow for other books on . Also, confirming fix for broken links with the latest (0.0.24) `mdbook` release. --- diff --git a/src/doc/MIGRATION_MAP b/src/doc/MIGRATION_MAP index 4eb365d45..433a7851f 100644 --- a/src/doc/MIGRATION_MAP +++ b/src/doc/MIGRATION_MAP @@ -1,5 +1,5 @@ -index.md book/src/SUMMARY.md book/src/getting-started.md book/src/getting-started/*.md -guide.md book/src/guide.md book/src/guide/*.md +index.md book/src/index.md book/src/getting-started/index.md book/src/getting-started/*.md +guide.md book/src/guide/index.md book/src/guide/*.md build-script.md book/src/reference/build-scripts.md config.md book/src/reference/config.md crates-io.md book/src/reference/publishing.md diff --git a/src/doc/book/src/SUMMARY.md b/src/doc/book/src/SUMMARY.md index ff388e770..5f46bfade 100644 --- a/src/doc/book/src/SUMMARY.md +++ b/src/doc/book/src/SUMMARY.md @@ -2,11 +2,11 @@ [Introduction](index.md) -* [Getting Started](getting-started.md) +* [Getting Started](getting-started/index.md) * [Installation](getting-started/installation.md) * [First Steps with Cargo](getting-started/first-steps.md) -* [Cargo Guide](guide.md) +* [Cargo Guide](guide/index.md) * [Why Cargo Exists](guide/why-cargo-exists.md) * [Creating a New Project](guide/creating-a-new-project.md) * [Working on an Existing Project](guide/working-on-an-existing-project.md) @@ -16,7 +16,7 @@ * [Tests](guide/tests.md) * [Continuous Integration](guide/continuous-integration.md) -* [Cargo Reference](reference.md) +* [Cargo Reference](reference/index.md) * [Specifying Dependencies](reference/specifying-dependencies.md) * [The Manifest Format](reference/manifest.md) * [Configuration](reference/config.md) diff --git a/src/doc/book/src/getting-started.md b/src/doc/book/src/getting-started.md deleted file mode 100644 index 22a7315cf..000000000 --- a/src/doc/book/src/getting-started.md +++ /dev/null @@ -1,6 +0,0 @@ -## Getting Started - -To get started with Cargo, install Cargo (and Rust) and set up your first crate. - -* [Installation](getting-started/installation.html) -* [First steps with Cargo](getting-started/first-steps.html) diff --git a/src/doc/book/src/getting-started/first-steps.md b/src/doc/book/src/getting-started/first-steps.md index e0f964e80..190f69f55 100644 --- a/src/doc/book/src/getting-started/first-steps.md +++ b/src/doc/book/src/getting-started/first-steps.md @@ -67,4 +67,4 @@ Hello, world! ### Going further -For more details on using Cargo, check out the [Cargo Guide](guide.html) +For more details on using Cargo, check out the [Cargo Guide](guide/index.html) diff --git a/src/doc/book/src/getting-started/index.md b/src/doc/book/src/getting-started/index.md new file mode 100644 index 000000000..22a7315cf --- /dev/null +++ b/src/doc/book/src/getting-started/index.md @@ -0,0 +1,6 @@ +## Getting Started + +To get started with Cargo, install Cargo (and Rust) and set up your first crate. + +* [Installation](getting-started/installation.html) +* [First steps with Cargo](getting-started/first-steps.html) diff --git a/src/doc/book/src/guide.md b/src/doc/book/src/guide.md deleted file mode 100644 index d8bfda17c..000000000 --- a/src/doc/book/src/guide.md +++ /dev/null @@ -1,13 +0,0 @@ -## Cargo Guide - -This guide will give you all that you need to know about how to use Cargo to -develop Rust projects. - -* [Why Cargo Exists](guide/why-cargo-exists.html) -* [Creating a New Project](guide/creating-a-new-project.html) -* [Working on an Existing Cargo Project](guide/working-on-an-existing-project.html) -* [Dependencies](guide/dependencies.html) -* [Project Layout](guide/project-layout.html) -* [Cargo.toml vs Cargo.lock](guide/cargo-toml-vs-cargo-lock.html) -* [Tests](guide/tests.html) -* [Continuous Integration](guide/continuous-integration.html) diff --git a/src/doc/book/src/guide/index.md b/src/doc/book/src/guide/index.md new file mode 100644 index 000000000..d8bfda17c --- /dev/null +++ b/src/doc/book/src/guide/index.md @@ -0,0 +1,13 @@ +## Cargo Guide + +This guide will give you all that you need to know about how to use Cargo to +develop Rust projects. + +* [Why Cargo Exists](guide/why-cargo-exists.html) +* [Creating a New Project](guide/creating-a-new-project.html) +* [Working on an Existing Cargo Project](guide/working-on-an-existing-project.html) +* [Dependencies](guide/dependencies.html) +* [Project Layout](guide/project-layout.html) +* [Cargo.toml vs Cargo.lock](guide/cargo-toml-vs-cargo-lock.html) +* [Tests](guide/tests.html) +* [Continuous Integration](guide/continuous-integration.html) diff --git a/src/doc/book/src/index.md b/src/doc/book/src/index.md index ddbd8b163..3de0fc137 100644 --- a/src/doc/book/src/index.md +++ b/src/doc/book/src/index.md @@ -13,12 +13,12 @@ dependencies, compiles your project, makes packages, and upload them to To get started with Cargo, install Cargo (and Rust) and set up your first crate. -**[Cargo Guide](guide.html)** +**[Cargo Guide](guide/index.html)** The guide will give you all you need to know about how to use Cargo to develop Rust projects. -**[Cargo Reference](reference.html)** +**[Cargo Reference](reference/index.html)** The reference covers the details of various areas of Cargo. diff --git a/src/doc/book/src/reference.md b/src/doc/book/src/reference.md deleted file mode 100644 index 4fec36165..000000000 --- a/src/doc/book/src/reference.md +++ /dev/null @@ -1,16 +0,0 @@ -## Cargo Reference - -Now that you have an overview of how to use Cargo and have created your first -crate, you may be interested in more details in the following areas. - -The reference covers the details of various areas of Cargo. - -* [Specifying Dependencies](reference/specifying-dependencies.html) -* [The Manifest Format](reference/manifest.html) -* [Configuration](reference/config.html) -* [Environment Variables](reference/environment-variables.html) -* [Build Scripts](reference/build-scripts.html) -* [Publishing on crates.io](reference/publishing.html) -* [Package ID Specifications](reference/pkgid-spec.html) -* [Source Replacement](reference/source-replacement.html) -* [External Tools](reference/external-tools.html) diff --git a/src/doc/book/src/reference/index.md b/src/doc/book/src/reference/index.md new file mode 100644 index 000000000..4fec36165 --- /dev/null +++ b/src/doc/book/src/reference/index.md @@ -0,0 +1,16 @@ +## Cargo Reference + +Now that you have an overview of how to use Cargo and have created your first +crate, you may be interested in more details in the following areas. + +The reference covers the details of various areas of Cargo. + +* [Specifying Dependencies](reference/specifying-dependencies.html) +* [The Manifest Format](reference/manifest.html) +* [Configuration](reference/config.html) +* [Environment Variables](reference/environment-variables.html) +* [Build Scripts](reference/build-scripts.html) +* [Publishing on crates.io](reference/publishing.html) +* [Package ID Specifications](reference/pkgid-spec.html) +* [Source Replacement](reference/source-replacement.html) +* [External Tools](reference/external-tools.html) diff --git a/src/doc/book/src/reference/specifying-dependencies.md b/src/doc/book/src/reference/specifying-dependencies.md index a671de516..ba7145d12 100644 --- a/src/doc/book/src/reference/specifying-dependencies.md +++ b/src/doc/book/src/reference/specifying-dependencies.md @@ -11,7 +11,7 @@ development. Let's take a look at how to do each of these. Cargo is configured to look for dependencies on [crates.io] by default. Only the name and a version string are required in this case. In [the cargo -guide](guide.html), we specified a dependency on the `time` crate: +guide](guide/index.html), we specified a dependency on the `time` crate: ```toml [dependencies] @@ -126,12 +126,11 @@ rand = { git = "https://github.com/rust-lang-nursery/rand", branch = "next" } ### Specifying path dependencies -Over time, our `hello_world` project from [the guide](guide.html) has grown -significantly in size! It’s gotten to the point that we probably want to -split out a separate crate for others to use. To do this Cargo supports -**path dependencies** which are typically sub-crates that live within one -repository. Let’s start off by making a new crate inside of our `hello_world` -project: +Over time, our `hello_world` project from [the guide](guide/index.html) has +grown significantly in size! It’s gotten to the point that we probably want to +split out a separate crate for others to use. To do this Cargo supports **path +dependencies** which are typically sub-crates that live within one repository. +Let’s start off by making a new crate inside of our `hello_world` project: ```shell # inside of hello_world/